import React from 'react'

import { ScrollRankingBoard } from '@jiaminghi/data-view-react'

import './RankingBoard.less'
import { useTranslation } from 'react-i18next'
const config = {
  data: [
    {
      name: '物料1',
      value: 55,
    },
    {
      name: '物料2',
      value: 120,
    },
    {
      name: '物料3',
      value: 78,
    },
    {
      name: '物料4',
      value: 66,
    },
    {
      name: '物料5',
      value: 80,
    },
    {
      name: '物料6',
      value: 45,
    },
    {
      name: '物料7',
      value: 29,
    },
    {
      name: '物料8',
      value: 29,
    },
    {
      name: '物料9',
      value: 29,
    },
    {
      name: '物料10',
      value: 29,
    }
  ],
  rowNum: 9,
  waitTime:3000,
  carousel:'single'
}

export default () => {
  const { t } = useTranslation()
  return (
    <div id="ranking-board">
      <div className="ranking-board-title">{t('实时库存TOP 10')}</div>
      <ScrollRankingBoard config={config} />
    </div>
  )
}
